using Assets.Scripts.GDK;
using System.Collections.Generic;

namespace Brick
{
	public class LevelInfoBoxModule : gdk_base_Imodule
	{
		public void sendCustomEvent()
		{
			GDK.ModuleManger.Module<AdvansBoxMoudle>().OnEnterGame();
			GameManager.startGameEvent(GameData.selectIndex);
			GameManager.sendCustomEvent(CustomEventID.ENTER_GAME, GameData.selectIndex.ToString());
		}

		public void sendFailCustomEvent()
		{
			GameManager.endGameEvent(GameData.selectIndex);
			string starLevel = GDK.ModuleManger.Module<ScoreBoxModule>().getStarLevel();
			GameManager.sendCustomEvent(CustomEventID.FAILED_GAME, new List<string>
		{
			GameData.selectIndex.ToString(),
			starLevel
		});
		}

		public void sendPassCustomEvent()
		{
			GameManager.endGameEvent(GameData.selectIndex);
			string starLevel = GDK.ModuleManger.Module<ScoreBoxModule>().getStarLevel();
			GameManager.sendCustomEvent(CustomEventID.PASS_GAME, new List<string>
		{
			GameData.selectIndex.ToString(),
			starLevel
		});
		}

		public void sendFirstPassCustomEvent()
		{
			GameManager.endGameEvent(GameData.selectIndex);
			string starLevel = GDK.ModuleManger.Module<ScoreBoxModule>().getStarLevel();
			GameManager.sendCustomEvent(CustomEventID.FIRST_PASS_GAME, new List<string>
		{
			GameData.selectIndex.ToString(),
			starLevel
		});
		}

		public void sendPauseCustomEvent()
		{
			GameManager.endGameEvent(GameData.selectIndex);
			string starLevel = GDK.ModuleManger.Module<ScoreBoxModule>().getStarLevel();
			GameManager.sendCustomEvent(CustomEventID.PAUSE_GAME, new List<string>
		{
			GameData.selectIndex.ToString(),
			starLevel
		});
		}

		public void sendUseToolCustomEvent(string toolID)
		{
			GameManager.sendCustomEvent(CustomEventID.USETOOL_GAME, new List<string>
		{
			GameData.selectIndex.ToString(),
			toolID
		});
		}
	}
}

